package com.br.fmn.clubedoimovel.negocio.entidade;

import com.br.fmn.clubedoimovel.negocio.exception.InvalidPlacesException;

public class PlaceEntity {

	private String address;
	private int number;
	private String neighborhood;
	private String CEP;
	private int latitude;
	private int longitude;
	public static final String PLACE_KEY = "AIzaSyD2QkKGdpL8rq-4Q2d_GS7PJYVsIpcHC-I";
	public static final String TYPE = "geocode";
	public static final String REGION = "br";
	public static final String LANGUAGE = "pt";
	public static final String SENSOR = "true";

	public PlaceEntity() {

	}

	public PlaceEntity(String address, int number, String neighborhood,
			String CEP, int latitude, int longitude) {
		this.address = address;
		this.number = number;
		this.neighborhood = neighborhood;
		this.CEP = CEP;
		this.latitude = latitude;
		this.longitude = longitude;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) throws InvalidPlacesException {

		if (address == null || address.equals("")) {

			throw new InvalidPlacesException(
					"Invalid Places. Please, check the places...");
		} else {

			this.address = address;
		}

	}

	public int getLatitude() {
		return latitude;
	}

	public void setLatitude(int latitude) {
		this.latitude = latitude;
	}

	public int getLongitude() {
		return longitude;
	}

	public void setLongitude(int longitude) {
		this.longitude = longitude;
	}

	public int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
	}

	public String getNeighborhood() {
		return neighborhood;
	}

	public void setNeighborhood(String neighborhood) {
		this.neighborhood = neighborhood;
	}

	public String getCEP() {
		return CEP;
	}

	public void setCEP(String CEP) {
		this.CEP = CEP;
	}

}
